package top.zsc.cloud.common.vo;


import lombok.Data;

/**
 * @ClassName QueryParams
 * @Description TODO
 * @Author Jams
 * @Date 2018/11/2918:24
 * @Version 1.0
 */
@Data
public class QueryParams {

    private String field = "*";
    private String where = "";
    private String order = "";
    private String defaultOrder;
    private String join;
    private int currPage = 1;
    private int indexCount;
    private int pageSize = 30;

    public void addWhere(String condition) {
        if (where == null || "".equals(where)) {
            setWhere(condition);
        } else {
            setWhere(getWhere() + " and " + condition);
        }
    }

}
